local skel = fk.CreateSkill{
  name = "lb__yinyu",
  tags = {Skill.Limited},
}

Fk:loadTranslationTable{
  ["lb__yinyu"] = "饮羽",
  [":lb__yinyu"] = "<b>限定技</b>，当你使用【杀】对有「<b>鸣弦</b>」牌的角色造成伤害后，你可以将场上所有「<b>鸣弦</b>」牌依次对其使用。",

  ["#lb__yinyu"] = "饮羽：你可以对其使用所有「<b>鸣弦</b>」牌",

  ["$lb__yinyu1"] = "风起，云鸢就位。",
  ["$lb__yinyu2"] = "只此，一箭！",
}

skel:addEffect(fk.Damage, {
  can_trigger = function(self, event, target, player, data)
      return target == player and player:hasSkill(skel.name) and 
      player:usedSkillTimes(skel.name,Player.HistoryGame) == 0 and 
      data.from and data.from == player and
      #data.to:getPile("lb__mingxian") > 0 and
      data.card and data.card.trueName == "slash"
  end,
  on_cost = function(self, event, target, player, data)
    return player.room:askToSkillInvoke(player, {skill_name = skel.name, prompt = "#lb__yinyu"})
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    for _, t in ipairs(room:getAlivePlayers()) do
      for _, c in ipairs(t:getPile("lb__mingxian")) do
        if data.to.dead then break end
        room:askToUseRealCard(player,{
          pattern = {c},
          skill_name = skel.name,
          cancelable = false,
          extra_data = {exclusive_targets = {data.to.id} ,expand_pile = {c}},
        })
      end
    end
  end,
})

return skel